#! /bin/sh

rofi_cmd() {
	rofi -dmenu \
		-theme ~/.config/rofi/powermenu.rasi
}

chosen=$(printf "⏻ poweroff\n󰜉 reboot\n lock\n suspend\n󰗼 logout" | rofi_cmd)

case "$chosen" in

# Для systemd
"⏻ poweroff") systemctl poweroff ;;
"󰜉 reboot") systemctl reboot ;;
" lock") betterlockscreen -l ;;
" suspend") systemctl suspend && betterlockscreen -l ;;
"󰗼 logout") i3-msg exit ;;

# Для runit
	# "⏻ poweroff") sudo shutdown -h now ;;
	# "󰜉 reboot") sudo shutdown -r now ;;
	# "󰗼 exit") bspc quit ;;
	# *) exit 1 ;;

esac
